package Board;

import java.io.File;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;

import org.apache.ibatis.session.SqlSession;

import com.oreilly.servlet.MultipartRequest;
import com.oreilly.servlet.multipart.DefaultFileRenamePolicy;

import common.ClampFactory;

public class BoardMyBa2 {
	private SqlSession session;
	BoardVo vo;

	public BoardMyBa2() {
		try {
			session = ClampFactory.getFactory().openSession();
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}

	
	
	public ArrayList<BoardVo> list(){
		//System.out.println(vo.getBo_part());
		ArrayList<BoardVo> list = null;
		try{
			list = (ArrayList<BoardVo>)session.selectList("board.list22", vo);
			/*session.close();*/
			
		}catch(Exception ex){
			ex.printStackTrace();
		}
		
		return list;
	}
	
	public ArrayList<BoardVo> list2(){
		//System.out.println(vo.getBo_part());
		ArrayList<BoardVo> list2 = null;
		try{
			list2 = (ArrayList<BoardVo>)session.selectList("board.list222", vo);
			
			
			session.close();
			
		}catch(Exception ex){
			ex.printStackTrace();
		}
		
		return list2;
	}
	
	
	
	

	public SqlSession getSession() {
		return session;
	}

	public void setSession(SqlSession session) {
		this.session = session;
	}

	public BoardVo getVo() {
		return vo;
	}

	public void setVo(BoardVo vo) {
		this.vo = vo;
	}
}
